﻿using System;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using Happy.ExtentionMethods.Reflection;
using Happy.Test.Infrastructure.ExtentionMethods.Reflection.Stub;

namespace Happy.Test.Infrastructure.ExtentionMethods.Reflection
{
    [TestClass]
    public class AssemblyExtensionsTest
    {
        [TestMethod]
        public void CreateConcreteDescendentInstances_Test()
        {
            var instances = this
                .GetType()
                .Assembly
                .CreateConcreteDescendentInstances<ITestInterface>();

            Assert.AreEqual(2, instances.Count());
        }
    }
}
